package com.wn.entity;

import com.wn.validator.RoleAddGroup;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class Role {
    @Min(value = 2 ,groups = RoleAddGroup.class)
    private int id;

    @NotBlank(message = "不能为空！")
    private String name;

    @NotNull(message = "权限不能为空")
    @Valid
    private User user;

    private String description;

    @Size(min = 2, max = 5)
    private String status;


    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
